package web.loaisp;

public class LoaiSanPham {
	private String maloaisp;
	private String tenloaisp;

	public LoaiSanPham(String malsp, String tlsp) {
		this.maloaisp = malsp;
		this.tenloaisp = tlsp;
	}

	public LoaiSanPham() {

	}

	public String getMaloaisp() {
		return maloaisp;
	}

	public void setMaloaisp(String maloaisp) {
		this.maloaisp = maloaisp;
	}

	public String getTenloaisp() {
		return tenloaisp;
	}

	public void setTenloaisp(String tenloaisp) {
		this.tenloaisp = tenloaisp;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((maloaisp == null) ? 0 : maloaisp.hashCode());
		result = prime * result
				+ ((tenloaisp == null) ? 0 : tenloaisp.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LoaiSanPham other = (LoaiSanPham) obj;
		if (maloaisp == null) {
			if (other.maloaisp != null)
				return false;
		} else if (!maloaisp.equals(other.maloaisp))
			return false;
		if (tenloaisp == null) {
			if (other.tenloaisp != null)
				return false;
		} else if (!tenloaisp.equals(other.tenloaisp))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "LoaiSanPham [maloaisp=" + maloaisp + ", tenloaisp=" + tenloaisp
				+ "]";
	}

}
